require "gruff"

class StatusController < ApplicationController
  def index
    if GAME_ENGINE.players.size > 0
      @current_scores = GAME_ENGINE.status
      @historical_scores = GAME_ENGINE.historical_scores
      @max = GAME_ENGINE.max_score
      
      puts "Status = "+@current_scores.inspect
      puts "historical scores = "+@historical_scores.inspect
    else
      @error_message = "No Players Yet!!!"
    end
#    
#    graph = Gruff::Line.new 475
#    graph.title = "Current Scores"        
#
#    data.each_pair {|k,v| graph.data(k, v) }
#
#    send_data(graph.to_blob, :disposition => 'inline', :type => 'image/png', :filename => "gruff.png")
    
  end
end
